set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR mips)
set(_compiler_prefix /opt/toolchains/mips-linux-gnu)
if(NOT $ENV{CROSS_COMPILER_PREFIX} STREQUAL "")
    set(_compiler_prefix $ENV{CROSS_COMPILER_PREFIX})
elseif(CROSS_COMPILER_PREFIX)
    set(_compiler_prefix ${CROSS_COMPILER_PREFIX})
endif()
set(CMAKE_C_COMPILER ${_compiler_prefix}/bin/mips-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER ${_compiler_prefix}/bin/mips-linux-gnu-g++)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

unset(_compiler_prefix)
